package com.agu.mgt.fms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.agu.utils.Query;

import java.util.List;
import java.util.Map;

import com.agu.mgt.fms.dao.FsmsSendCanvasDao;
import com.agu.entity.fms.FsmsSendCanvasEntity;
import com.agu.mgt.fms.service.FsmsSendCanvasService;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;


@Service("fsmsSendCanvasService")
@Transactional(readOnly = true)
public class FsmsSendCanvasService{
	@Autowired
	private FsmsSendCanvasDao fsmsSendCanvasDao;
	
	
	public FsmsSendCanvasEntity queryObject(Integer id){
		return fsmsSendCanvasDao.queryObject(id);
	}
	
	
	public List<FsmsSendCanvasEntity> queryList(Map<String, Object> map){
		return fsmsSendCanvasDao.queryList(map);
	}

    
	public Page<FsmsSendCanvasEntity> queryPageList(Query query){
	    PageHelper.startPage(query.getPage(), query.getLimit());
	    return fsmsSendCanvasDao.queryPageList(query);
	}
	
	
	public int queryTotal(Map<String, Object> map){
		return fsmsSendCanvasDao.queryTotal(map);
	}
	
	
	@Transactional
	public void save(FsmsSendCanvasEntity fsmsSendCanvas){
		fsmsSendCanvasDao.save(fsmsSendCanvas);
	}
	
	
	@Transactional
	public void update(FsmsSendCanvasEntity fsmsSendCanvas){
		fsmsSendCanvasDao.update(fsmsSendCanvas);
	}
	
	
	@Transactional
	public void delete(Integer id){
		fsmsSendCanvasDao.delete(id);
	}
	
	
	@Transactional
	public void deleteBatch(Integer[] ids){
		fsmsSendCanvasDao.deleteBatch(ids);
	}
}
